/*
 * OrderStatusView.java
 * business
 *
 * Created by ChenTao on 2017/2/21.
 *
 * Copyright (c) 2017年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.widget.view;

import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.yidiandao.business.R;

/** 根据订单状态给变文字及功能 */
public class OrderStatusView extends LinearLayout {
    private TextView mTvOrderBuy;

    public OrderStatusView(Context context) {
        this(context, null);
    }

    public OrderStatusView(Context context, AttributeSet attrs) {
        super(context, attrs);
        View root = View.inflate(context, R.layout.item_order_button_view, this);

        mTvOrderBuy = (TextView) root.findViewById(R.id.tv_order);
    }

    public void setText(String text) {
        if (!TextUtils.isEmpty(text)) {
            mTvOrderBuy.setText(text);
        }
    }
}
